package com.shouhe.mysap.util;

import com.shouhe.mysap.common.PersonLogin;
import com.shouhe.mysap.entity.SalePerson;

/**
 * @author 守鹤
 * @date 2020/5/31 22:55
 */
public class PersonUtil {
    public static PersonLogin getPerosnLogin(Object person){
        String username="";
        String pwd="";
        if(person instanceof SalePerson){
            SalePerson p=(SalePerson)person;
            username=p.getSaleName();
            pwd=p.getSalePwd();
        }


        PersonLogin login = new PersonLogin();
        login.setUname(username);
        login.setPwd(pwd);
        return login;
    }

}
